package com.yaj.myfactorysupport.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yaj.myfactorysupport.dto.TmWorkerDto;
import com.yaj.myfactorysupport.entity.TmWorker;
import com.yaj.myfactorysupport.util.RespBean;
import com.yaj.myfactorysupport.vo.TmWorkerVo;
import org.springframework.security.core.userdetails.UserDetailsService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wei
 * @since 2021-04-20
 */
public interface TmWorkerService extends IService<TmWorker>, UserDetailsService {
    /**
     * 检查用户名密码是否正确
     * @param tmWorkerDto
     * @return
     */
    String checkUserLogin(TmWorkerDto tmWorkerDto);

    TmWorkerVo getWorkerInfo(String username);

    /**
     * 登录后返回token
     * @param workerId
     * @param request
     * @return
     */
    RespBean login(String workerId, HttpServletRequest request);
}
